package com.gxuwz.util;

import java.util.UUID;

/**
 * 创建加工用户唯一标识userId
 * @author Administrator
 *
 */
public class UidUtils {
    public static String UID(Class<?> clazz) {
        return UUID.randomUUID().toString().toUpperCase();
    }

    public static String UID() {
        return UUID.randomUUID().toString().toUpperCase();
    }
    
    /**
     * 随机十位数字
     * @return
     */
    public static String UIDD(){
		int machineId = 1;//起始
        int hashCodeV = UidUtils.UID().toString().hashCode();
        if(hashCodeV < 0) {//有可能是负数
            hashCodeV = - hashCodeV;
        }
        return (machineId + String.format("%d", hashCodeV));
    }
}
